import { BaseCmd, BaseQry, BaseView, CommonEnum, OperationLog } from "@/types/global-business";
import {
  TableColumnData,
  TableData,
} from '@arco-design/web-vue/es/table/interface';
import { OwnerAddCmd } from "@/types/crm/customer/owner";
import { HouseAddCmd } from "@/types/crm/customer/house";

export interface LeadCoreExpand {
  discardStatus?: CommonEnum;
  operationLog?: OperationLog;
}

export interface LeadCoreView extends BaseView {
  companyId?: number;
  indexId?: number;
  status?: CommonEnum;
  ownerId?: number;
  houseId?: number;
  sourceGroup?: CommonEnum;
  sourceItem?: CommonEnum;
  channelId?: number;
  channelName?: string;
  activityId?: number;
  activityName?: string;
  latestAtTime?: Date;
  inatDays?: number;
  healthLevel?: CommonEnum;
  expectedToStoreTime?: Date;
  expectedToHouseTime?: Date;
  storeDeptId?: number;
  unitDeptId?: number;
  salesDeptId?: number;
  expand?: LeadCoreExpand;
  owner?: BaseView;
  house?: BaseView;
}

export interface LeadCoreAddCmd extends BaseCmd {
  scene?: CommonEnum;
  companyId?: number;
  sourceItem?: CommonEnum;
  channelId?: number;
  activityId?: number;
  ownerAddCmd?: OwnerAddCmd;
  houseAddCmd?: HouseAddCmd;
  storeDeptId?: number;
}

export interface LeadCorePageQry extends BaseQry {
  companyId?: number;
  keyword?: string;
}

export const EMPLOYEE_COLUMNS: TableColumnData[] = [
  {
    title: '序号',
    dataIndex: 'idx',
    width: 60,
    fixed: 'left',
  },
  {
    title: '状态',
    dataIndex: 'status',
    width: 120,
  },
  {
    title: '工号',
    dataIndex: 'code',
    width: 120,
  },
  {
    title: '姓名',
    dataIndex: 'name',
    width: 120,
  },
  {
    title: '手机号',
    dataIndex: 'phone',
    width: 200,
  },
  {
    title: '部门',
    dataIndex: 'departmentId',
    width: 200,
  },
  {
    title: '性别',
    dataIndex: 'gender',
    width: 60,
  },
  {
    title: '操作',
    dataIndex: 'action',
    width: 200,
    fixed: 'right',
  },
];
